#include "http_server.hpp"
#include <unistd.h>
#include <cstdlib>

static void Usage(std::string proc)
{
  std::cerr << "Usage: " << "\n\t" << proc << " port" << std::endl;
}

//  ./http_server 8081
int main(int argc, char *argv[])
{
  if(argc != 2)
  {
    Usage(argv[0]);
    exit(1);
  }

  ns_http::HttpServer http_server(atoi(argv[1]));
  http_server.InitHttpServer();

  http_server.Loop();

  return 0;
}
